﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace SuperLottery
{
	public class ServiceDemo : IServiceDemo
	{
		public string GetUser(int a, int userid, int b)
		{
			return userid.ToString();
		}

		public string GetData(int a, int b)
		{
			Console.WriteLine(a + b);
			return string.Format("You entered: {0}", a + b);
		}

		public CompositeType GetDataUsingDataContract()
		{
			CompositeType composite = new CompositeType();
			if (composite == null)
			{
				throw new ArgumentNullException("composite");
			}
			if (composite.BoolValue)
			{
				composite.StringValue += "Suffix";
			}
			return composite;
		}

		public int PostData(int x)
		{
			return x;
		}

		public void DeleteData(int value)
		{
		}
	}
}
